:root {
    --bg: #06070a;
    --fg: #ffffff;
    --muted: #f0f4ff;
    --primary: #66b3ff;
    --accent: #ff8f6a;
    --surface: transparent;
    --ring: rgba(255,255,255,0.4);
}

* { box-sizing: border-box; }

/* 屏幕阅读器专用隐藏文本 */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}
html, body {
    height: 100%;
    margin: 0;
}
body {
    font-family: 'Inter', system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
    color: var(--fg);
    background: var(--bg);
    overflow-x: hidden;
}

#bg {
    position: fixed;
    inset: 0;
    z-index: 0;
    overflow: hidden;
    pointer-events: none;
}

.black-hole-video {
    position: fixed;
    top: 0; left: 0;
    width: 100vw; height: 100vh;
    object-fit: cover;
    z-index: 0;
}

.background-music {
    position: fixed;
    top: -9999px;
    left: -9999px;
    opacity: 0;
    pointer-events: none;
}


.app {
    position: relative;
    z-index: 1;
    max-width: 1100px;
    margin: 0 auto;
    padding: 24px 16px 40px;
}

.header h1 {
    margin: 0 0 6px 0;
    font-size: clamp(22px, 3.6vw, 36px);
    font-weight: 800;
    letter-spacing: 0.3px;
    text-shadow: 
        0 0 4px rgba(0,0,0,1),
        0 0 8px rgba(0,0,0,0.8),
        0 2px 16px rgba(0,0,0,0.9),
        0 0 32px rgba(0,0,0,0.7);
}
.header p { 
    color: var(--muted); 
    margin: 0 0 20px 0; 
    text-shadow: 
        0 0 2px rgba(0,0,0,1),
        0 0 4px rgba(0,0,0,0.8),
        0 1px 6px rgba(0,0,0,0.9);
}

.controls {
    display: flex;
    align-items: center;
    gap: 12px;
    background: var(--surface);
    border: 1px solid var(--ring);
    padding: 10px 12px;
    border-radius: 12px;
    backdrop-filter: blur(6px);
}
.direction {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 8px;
    border-radius: 8px;
    cursor: pointer;
}
.direction input { accent-color: var(--primary); }
#swap {
    margin-left: auto;
    border: 1px solid var(--ring);
    background: transparent;
    color: var(--fg);
    border-radius: 8px;
    padding: 6px 10px;
    cursor: pointer;
}
#swap:hover { background: rgba(255,255,255,0.06); }

.panels {
    display: flex;
    gap: 14px;
    margin-top: 14px;
    align-items: flex-start;
}

.panel {
    background: transparent;
    border: 1px solid var(--ring);
    border-radius: 14px;
    padding: 12px;
    flex: 1;
}
.panel legend {
    padding: 0 8px;
    color: var(--primary);
    font-weight: 600;
    text-shadow: 
        0 0 2px rgba(0,0,0,1),
        0 0 4px rgba(0,0,0,0.8),
        0 1px 6px rgba(0,0,0,0.9);
}

.row {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 10px;
}
#miller-panel .row { 
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}

label { 
    font-size: 12px; 
    color: var(--muted); 
    display: grid; 
    gap: 6px; 
    text-shadow: 
        0 0 2px rgba(0,0,0,1),
        0 0 4px rgba(0,0,0,0.8),
        0 1px 4px rgba(0,0,0,0.9);
}

/* 日期标签特殊优化 */
.date-row label {
    font-size: 13px;
    font-weight: 500;
    color: #ffffff;
    text-shadow: 
        0 0 3px rgba(0,0,0,1),
        0 0 6px rgba(0,0,0,0.9),
        0 0 9px rgba(0,0,0,0.7),
        0 2px 8px rgba(0,0,0,0.8);
}

/* 米勒星时间标签特殊优化 */
#miller-panel label {
    font-size: 13px;
    font-weight: 500;
    color: #ffffff;
    text-shadow: 
        0 0 3px rgba(0,0,0,1),
        0 0 6px rgba(0,0,0,0.9),
        0 0 9px rgba(0,0,0,0.7),
        0 2px 8px rgba(0,0,0,0.8);
}
input[type="number"],
input[type="date"] {
    width: 100%;
    padding: 10px 10px;
    border-radius: 10px;
    border: 1px solid var(--ring);
    background: rgba(0,0,0,0.3);
    color: var(--fg);
    outline: none;
    text-shadow: 0 0 2px rgba(0,0,0,0.8);
}

/* 日期输入框特殊优化 */
.date-row input[type="date"] {
    background: rgba(0,0,0,0.4);
    border: 1px solid rgba(255,255,255,0.5);
    color: #ffffff;
    text-shadow: 
        0 0 3px rgba(0,0,0,1),
        0 0 6px rgba(0,0,0,0.8);
    font-weight: 500;
}

/* 米勒星时间输入框特殊优化 */
#miller-panel input[type="number"] {
    background: rgba(0,0,0,0.4);
    border: 1px solid rgba(255,255,255,0.5);
    color: #ffffff;
    text-shadow: 
        0 0 3px rgba(0,0,0,1),
        0 0 6px rgba(0,0,0,0.8);
    font-weight: 500;
}
input[type="number"]:focus,
input[type="date"]:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(106,168,255,0.18); }

/* 日期输入框焦点状态特殊优化 */
.date-row input[type="date"]:focus {
    border-color: #66b3ff;
    box-shadow: 
        0 0 0 3px rgba(102,179,255,0.3),
        0 0 8px rgba(102,179,255,0.2);
    background: rgba(0,0,0,0.5);
}

/* 米勒星时间输入框焦点状态特殊优化 */
#miller-panel input[type="number"]:focus {
    border-color: #66b3ff;
    box-shadow: 
        0 0 0 3px rgba(102,179,255,0.3),
        0 0 8px rgba(102,179,255,0.2);
    background: rgba(0,0,0,0.5);
}

/* 日期区两列布局 */
.date-row { 
    display: grid;
    grid-template-columns: repeat(2, 1fr); 
    gap: 10px;
    margin-top: 0;
}

.readout {
    margin-top: 14px;
    padding: 12px;
    border-radius: 12px;
    border: 1px solid var(--ring);
    background: transparent;
}
.readout #summary { 
    font-size: 14px; 
    text-shadow: 
        0 0 2px rgba(0,0,0,1),
        0 0 4px rgba(0,0,0,0.8),
        0 1px 6px rgba(0,0,0,0.9);
}
.readout small {
    color: var(--muted);
    font-size: 12px;
    text-shadow: 
        0 0 2px rgba(0,0,0,1),
        0 0 4px rgba(0,0,0,0.8),
        0 1px 4px rgba(0,0,0,0.9);
}
.footer { 
    margin-top: 14px; 
    color: var(--muted); 
    font-size: 12px; 
    text-shadow: 
        0 0 2px rgba(0,0,0,1),
        0 0 4px rgba(0,0,0,0.8),
        0 1px 4px rgba(0,0,0,0.9);
}

/* 音乐播放提示样式 */
.music-prompt {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 1000;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    border: 1px solid var(--ring);
    border-radius: 16px;
    padding: 20px;
    text-align: center;
    animation: fadeIn 0.5s ease-out;
}

.music-prompt-content p {
    margin: 0 0 16px 0;
    color: var(--fg);
    font-size: 14px;
}

.play-music-btn {
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 8px;
    padding: 10px 20px;
    font-size: 14px;
    cursor: pointer;
    transition: background 0.2s ease;
}

.play-music-btn:hover {
    background: #5a9eff;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translate(-50%, -50%) scale(0.9); }
    to { opacity: 1; transform: translate(-50%, -50%) scale(1); }
}

@media (max-width: 880px) {
    .row { grid-template-columns: repeat(2, 1fr); }
    #miller-panel .row { grid-template-columns: repeat(2, 1fr); }
    .panels { 
        flex-direction: column; 
    }
    .date-row { 
        grid-template-columns: 1fr; 
    }
}


